package test_new;

public class BubbleSortRecursion {

	int[] array;

	BubbleSortRecursion(int[] array) {
		this.array = array;
	}

	public int[] getArray() {
		return array;
	}
	
	public void makeBubbleSort(int[] array){
		int j = array.length;
		makeBubbleSort(array, j);
	}

	public void makeBubbleSort(int[] array, int j) {
		if(j == 0)
			return;
		int temp = 0;
		for(int i =0; i< j-1; i++)
		{
			if(array[i]>array[i+1])
			{
				temp = array[i];
				array[i] = array[i+1];
				array[i+1] = temp;
			}
		}

		j--;
		makeBubbleSort(array, j);

	}

}

